package xyz.riceball.generator.common.enums;

import lombok.Getter;

import java.io.File;

/**
 * <p>
 * 模版的类型
 * </p>
 *
 * @author xiaovcloud
 * @since 2022/5/14 15:19
 */
@Getter
public enum ENTemplateType {
    /**
     * 控制类
     */
    CONTROLLER("1", "controller", "template/Controller.java.vm", "Controller.java"),
    /**
     * 业务类接口
     */
    SERVICE("2", "service", "template/Service.java.vm", "Service.java"),
    /**
     * 业务实现类
     */
    SERVICE_IMPL("3", "service" + File.separator + "impl", "template/ServiceImpl.java.vm", "ServiceImpl.java"),
    /**
     * mapper
     */
    MAPPER("4", "mapper", "template/Mapper.java.vm", "Mapper.java"),
    /**
     * dao
     */
    DAO("5", "dao", "template/Dao.java.vm", "Dao.java"),
    /**
     * xml
     */
    MAPPER_XML("6", "xml", "template/Mapper.xml.vm", "Mapper.xml"),
    /**
     * 实体类
     */
    ENTITY("7", "entity", "template/Entity.java.vm", "PO.java"),
    /**
     * 菜单脚本
     */
    MENU_SQL("8", "menu", "template/Menu.sql.vm", "Menu.sql"),
    /**
     * react前端
     */
    REACT("9", "react", "template/index.jsx.vm", "index.tsx"),
    /**
     * react前端
     */
    REACT_ADD("10", "react", "template/add.jsx.vm", "add.tsx"),
    /**
     * vue前端
     */
    VUE("11", "vue", "template/index.vue.vm", "index.vue"),
    ;
    private final String value;

    private final String pkg;

    private final String templatePath;

    private final String suffix;

    ENTemplateType(String value, String pkg, String templatePath, String suffix) {
        this.value = value;
        this.pkg = pkg;
        this.templatePath = templatePath;
        this.suffix = suffix;
    }

}
